<template>
  <div class="recommend">
    <div class="recommend-item" v-for="item in recommend">
      <img :src="item.image"
           @click="recommendClick"
           alt="">
      <div>{{item.title}}</div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "recommend",
    props:{
      recommend: Array,
    },
    methods:{
      recommendClick(){
        this.$router.replace('/shopping')
      }
    }
  }
</script>

<style scoped>
  .recommend{
    display: flex;
    width: 100%;
    border-bottom: 5px solid rgba(100,100,100,.4);
  }
  .recommend-item{
    flex: 1;
    text-align: center;
    padding: 10px 0 20px;
  }
  .recommend-item img{
    width: 65px;
    height: 65px;
    margin-bottom: 5px;
  }
</style>
